From 94d4132170642fc5aee512d1d7ff1c8e07b0fecb Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 1 Aug 2014 23:31:11 -0700 Subject: [PATCH] Don't tromp over too many files when downloading the snapshot --- src/etc/dl-snapshot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/etc/dl-snapshot.py b/src/etc/dl-snapshot.py index aeee64dfc..c167ab50b 100644 --- a/src/etc/dl-snapshot.py +++ b/src/etc/dl-snapshot.py @@ -56,6 +56,9 @@ for p in tar.getnames(): fp = os.path.join(dst, name) print("extracting " + p) tar.extract(p, dst) - shutil.move(os.path.join(dst, p), fp) + tp = os.path.join(dst, p) + if os.path.isdir(tp) and os.path.exists(fp): + continue + shutil.move(tp, fp) tar.close() shutil.rmtree(os.path.join(dst, 'cargo-nightly-' + triple)) -- 2.30.2